home *** CD-ROM | disk | FTP | other *** search
- Path: cri.ens-lyon.fr!news
- From: elesueur@ens-lyon.fr (Emmanuel Lesueur)
- Newsgroups: comp.sys.amiga.programmer
- Subject: 2 bugs in SAS/C++ 6.56
- Date: 16 Apr 1996 10:25:50 GMT
- Organization: Ecole Normale Superieure de Lyon, France
- Distribution: world
- Message-ID: <4kvsje$2b0@cri.ens-lyon.fr>
- Reply-To: elesueur@ens-lyon.fr
- NNTP-Posting-Host: maxime.ens-lyon.fr
-
- Compiling the following code:
-
- ----8<----
-
- struct V {};
- struct A : virtual V {};
-
- void foo(A& x, A& y) { x=y; }
-
- ----8<----
-
- with 'sc resetopts tst.cxx' gives:
- "Internal Error: 4546 in /sas/gpp/v652am_cc/cxx/src/type.c."
-
- A simple workaround is to define explicitly the assignement
- operator for A (which is a good idea, anyway, since the number
- of times the virtual base V is copied by the implicitly defined
- assignement operator is unspecified).
-
-
- The second bug is a nasty one:
-
- ----8<----
-
- struct A { A(int&); };
-
- void foo(const int& r) { A a(r); }
-
- ----8<----
-
- Compiling this as above crashes the compiler, with miscellaneous
- guru numbers and Enforcer hits (this is the first time I manage to
- crash this compiler).
- Of course, the code above is ill-formed (non-const reference
- initialized with a const one), but crashing makes it hard to
- find the problem.
-
- ___________________________________________________
-
- Emmanuel Lesueur - elesueur@ens-lyon.fr
-
-
-